package com.duan.laugh.upms.api.feign;

import com.duan.laugh.common.core.util.R;
import com.duan.laugh.upms.api.pojo.dto.UserDetailDTO;
import com.duan.laugh.upms.api.pojo.entity.User;
import com.duan.laugh.upms.api.pojo.vo.UserParamsVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author duanjw
 */
@FeignClient("laugh-upms")
public interface UserService {
    /**
     * 根据用户名、客户端id、租户查看用户详细信息，包括用户、权限、角色
     *
     * @param userParamsVO 用户参数
     * @return
     */
    @PostMapping("user/detail/user")
    R<UserDetailDTO> getUserDetailByUserParams(@RequestBody UserParamsVO userParamsVO);

    /**
     * 根据 userIds 查询用户基本信息
     *
     * @param params
     * @return
     */
    @PostMapping("user/info")
    public R<List<User>> selectInfoByUserIds(@RequestBody Map<String, String> params);
}
